import React from 'react';
import content from './api-doc-content';
import './index.less';
import { getDownApi } from '@api/apiV4Down';

const ExternalApi = () => {
  return (
    <div className="external-api">
      <div className="external-api-title">API介绍</div>
      <p
        className="pdf"
        onClick={() => {
          getDownApi();
        }}
      >
        <svg
          width="13px"
          height="13px"
          viewBox="0 0 14 19"
          version="1.1"
          xmlns="http://www.w3.org/2000/svg"
          xmlnsXlink="http://www.w3.org/1999/xlink"
        >
          <g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
            <g
              id="ç«ç¹çæ§/å¯¼åºæ¥åäº¤äº"
              transform="translate(-405.000000, -651.000000)"
              fill="#F67E23"
            >
              <g id="ç¼ç»" transform="translate(405.000000, 651.000000)">
                <path
                  d="M13.6190104,5.5015625 C13.8632813,5.74765625 13.9908854,6.07942708 13.9908854,6.42578125 L13.9908854,17.3541667 C13.9908854,18.0796875 13.4221354,18.6666667 12.6966146,18.6666667 L1.33984375,18.6666667 C0.614322917,18.6666667 0.00911458333,18.0796875 0.00911458333,17.3541667 L0.00911458333,1.3125 C0.00911458333,0.586979167 0.614322917,-7.63833441e-14 1.33984375,-7.63833441e-14 L7.62890625,-7.63833441e-14 C7.81302083,-7.63833441e-14 7.99348958,0.0401041667 8.15755208,0.113020833 C8.17395833,0.1203125 8.1921875,0.127604167 8.20859375,0.13671875 C8.2359375,0.149479167 8.26145833,0.1640625 8.28697917,0.178645833 C8.38359375,0.236979167 8.47291667,0.30625 8.55494792,0.38828125 L13.6190104,5.5015625 Z M8.30338542,2.0125 L8.30338542,5.6875 L11.9638021,5.6875 L8.30338542,2.0125 Z M12.6783854,17.3541667 L12.6783854,7 L8.32161458,7 C7.59609375,7 6.99088542,6.41302083 6.99088542,5.6875 L6.99088542,1.3125 L1.32161458,1.3125 L1.32161458,17.3541667 L12.6783854,17.3541667 Z M3.740625,10.5 C4.51171875,10.5 5.14244792,10.7734375 5.14427083,11.6356771 C5.14427083,12.4651042 4.50260417,12.8333333 3.76614583,12.8333333 L3.36328125,12.8333333 L3.36328125,14 L2.52473958,14 L2.52473958,10.5 L3.740625,10.5 Z M3.72421875,12.1770833 C4.13255208,12.1770833 4.32942708,11.9783854 4.32942708,11.6375 C4.32942708,11.2838542 4.10520833,11.15625 3.70052083,11.15625 L3.36328125,11.15625 L3.36328125,12.1770833 L3.72421875,12.1770833 Z M6.74479167,10.5 C7.809375,10.5 8.51302083,11.0177083 8.51302083,12.2317708 C8.51302083,13.4458333 7.809375,14 6.7921875,14 L5.73307292,14 L5.73307292,10.5 L6.74479167,10.5 Z M6.69192708,13.3255208 C7.25520833,13.3255208 7.65260417,13.0666667 7.65260417,12.2372396 C7.65260417,11.4078125 7.25520833,11.1744792 6.69192708,11.1744792 L6.58984375,11.1744792 L6.58984375,13.3255208 L6.69192708,13.3255208 Z M11.3841146,11.1927083 L9.99869792,11.1927083 L9.99869792,11.9765625 L11.1835938,11.9765625 L11.1835938,12.6692708 L9.99869792,12.6692708 L9.99869792,14 L9.16015625,14 L9.16015625,10.5 L11.3841146,10.5 L11.3841146,11.1927083 Z"
                  id="å½¢ç¶ç»å"
                />
              </g>
            </g>
          </g>
        </svg>
        下载PDF
      </p>
      <div className="external-api-content">
        <div className="external-api-content-inner" dangerouslySetInnerHTML={{ __html: content }} />
      </div>
    </div>
  );
};

export default ExternalApi;
